<!DOCTYPE html>
<html class="no-js" lang="zxx" xmlns:th="http://www.thymeleaf.org">
  <head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="description" content="meta description" />
    <title>城乡产业交流平台</title>
    <!--=== Favicon ===-->
    <link
      rel="shortcut icon"
      href="assets/img/favicon.ico"
      type="image/x-icon"
    />
    <!--=== All Plugins CSS ===-->
    <link href="/static/css/plugins.css" rel="stylesheet" />
    <!--=== All Vendor CSS ===-->
    <link href="/static/css/vendor.css" rel="stylesheet" />
    <!--=== Main Style CSS ===-->
    <link href="/static/css/style.css" rel="stylesheet" />
    <!-- Modernizer JS -->
    <script src="/static/js/modernizr-2.8.3.min.js"></script>
    <link href="//unpkg.com/layui@2.9.6/dist/css/layui.css" rel="stylesheet" />

    <!--[if lt IE 9
      ]><script src="/static/js/html5shiv.min.js"></script>
      <script src="/static/js/respond.min.js"></script
    ><![endif]-->
  </head>
  <body>
    <!-- Start Header Area -->
    <header class="header-area">
      <!-- header top start -->
      <div th:replace="~{platform/common::header-top}"></div>
      <!-- header top end --><!-- main menu start -->
      <div class="main-menu-area sticky">
        <div class="container">
          <div class="row">
            <div class="col-12">
              <div class="main-menu">
                <div class="sticky-logo">
                  <a href="index.html"
                    ><img src="/static/logo.png" alt="brand logo" style="height: 70px"
                  /></a>
                </div>
                <!-- main menu navbar start -->
                <div th:replace="platform/common::mobile-menu"></div>
                <!-- main menu navbar end -->
              </div>
            </div>
            <div class="col-12 d-block d-lg-none">
              <div class="mobile-menu"></div>
            </div>
          </div>
        </div>
      </div>
      <!-- main menu end -->
    </header>
    <!-- end Header Area --><!-- main wrapper start -->
    <main>
      <!-- breadcrumb area start -->
      <div class="breadcrumb-area">
        <div class="container">
          <div class="row">
            <div class="col-12">
              <div class="breadcrumb-wrap text-center">
                <nav aria-label="breadcrumb">
                  <h2>云游日记</h2>
                  <ul class="breadcrumb">
                    <li class="breadcrumb-item">
                      <a href="index">主页</a>
                    </li>
                    <li class="breadcrumb-item active" aria-current="page">
                      云游日记
                    </li>
                  </ul>
                </nav>
              </div>
            </div>
          </div>
        </div>
      </div>
      <!-- breadcrumb area end --><!-- blog main wrapper start -->
      <div class="blog-main-wrapper pt-60 pb-60 pb-md-54 pb-sm-60">
        <div class="container">
          <div class="row">
            <div class="col-lg-12">

              <form class="layui-form" action="/bloglist" method="post">
                <div class="layui-form-item" id="area-picker3">
                  <div class="layui-form-label" style="width: 100px">选择地址:</div>
                  <div class="layui-input-inline" style="width: 200px;">
                    <select name="province" class="province-selector" lay-filter="province-3">
                      <option value="">--选择省--</option>
                    </select>
                  </div>
                  <div class="layui-input-inline" style="width: 200px;">
                    <select name="city" class="city-selector" lay-filter="city-3">
                      <option value="">--选择市--</option>
                    </select>
                  </div>
                  <button type="submit" class="layui-btn" >立即提交</button>
                  <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                  <button type="button" class="layui-btn layui-bg-blue" onclick="changeurl()">
                    编写云游日记
                  </button>

                </div>

              </form>


              <div class="blog-item-wrapper mb-30" th:each="blog:${pageinfo.getList()}">
                <div class="blog-img blog-img__full-width">
                  <a href="blog-details.html" th:href="@{/blogdetail/{id}(id=${blog.id})}"
                    ><img src="/static/picture/blog2.jpg" alt="" th:src="${blog.img}"
                  /></a>
                </div>
                <div class="blog-inner-content">
<!--                  <h5 class="cat-name"><a href="#">fruits</a></h5>-->
                  <h3><a href="blog-details.html">[[${blog.title}]]</a></h3>
                  <ul class="blog-meta">
<!--                    <li>Post by: <span>Admin</span></li>-->
                    <li>[[${#dates.format(blog.getCreateTime(), 'yyyy-MM-dd HH:mm:ss')}]]</li>
                  </ul>
                  <p>
                    [[${blog.des}]]
                  </p>
                  <a href="blog-details.html"  th:href="@{/blogdetail/{id}(id=${blog.id})}" class="btn btn__bg">立即阅读</a>
<!--                  <div class="blog-share-link">-->
<!--                    <h5>share this post</h5>-->
<!--                    <div class="blog-social-icon">-->
<!--                      <a href="#"><i class="fa fa-facebook"></i></a-->
<!--                      ><a href="#"><i class="fa fa-linkedin"></i></a-->
<!--                      ><a href="#"><i class="fa fa-twitter"></i></a-->
<!--                      ><a href="#"><i class="fa fa-pinterest"></i></a>-->
<!--                    </div>-->
<!--                  </div>-->
                </div>
              </div>
              <!-- start pagination area -->
              <div class="paginatoin-area text-center mt-30" th:if="${flag} ?: true">
                <ul class="pagination-box">
                  <li>
                    <a class="Previous"  th:href="'/productlist?page='+${pageinfo.prePage}"  th:if="${pageinfo.hasPreviousPage}"
                    ><i class="ion-ios-arrow-left"></i
                    ></a>
                  </li>
                  <li th:each="nav:${pageinfo.navigatepageNums}" th:class="${nav==pageinfo.pageNum}?'active':''"><a href="#" th:href="'/productlist?page='+${nav}">[[${nav}]]</a></li>
                  <li>
                    <a class="Next" href="#" th:if="${pageinfo.hasNextPage}" th:href="'/productlist?page='+${pageinfo.nextPage}"
                    ><i class="ion-ios-arrow-right"></i
                    ></a>
                  </li>
                </ul>
              </div>
              <!-- end pagination area -->
            </div>
          </div>
        </div>
      </div>
      <!-- blog main wrapper end -->
    </main>
    <!-- main wrapper end --><!--== Start Footer Area Wrapper ==-->
    <!--== End Footer Area Wrapper ==--><!-- Scroll to top start -->
    <div class="scroll-top not-visible"><i class="fa fa-angle-up"></i></div>
    <!-- Scroll to Top End --><!--=======================Javascript============================--><!--=== All Vendor Js ===-->
    <script src="/static/js/vendor.js"></script>
    <!--=== All Plugins Js ===-->
<!--    <script src="/static/js/plugins.js"></script>-->
    <!--=== Active Js ===-->
    <script src="/static/js/active.js"></script>
    <script src="//unpkg.com/layui@2.9.8/dist/layui.js"></script>
    <script>
      layui.config({
        base: '/layui/'
        , version: '1.0'
      });
      //一般直接写在一个js文件中
      layui.use(['layer', 'form', 'layarea'], function () {
        var layer = layui.layer
                , form = layui.form
                , layarea = layui.layarea;
        var laydate = layui.laydate;

        // 日期
        layarea.render({
          elem: '#area-picker3',
          change: function (res) {
            //选择结果
            console.log(res);
          }
        });
      });
    </script>
  <script th:inline="javascript">
    var flag = [[${@permission.getFlag()}]];
    function changeurl(){
      var flag = [[${@permission.getFlag()}]];
      if(flag==true) {
        layui.use(function () {
          var layer = layui.layer;
          layer.alert("还未登陆，请登陆之后添加！！！")
        })
      }else {
        location.href = "/platform/blog"

      }
    }
  </script>
  </body>
</html>
